package cn.com.connext.scrm.web.rest;

import cn.com.connext.scrm.domain.master.DwaQuestionRecord;
import cn.com.connext.scrm.domain.master.SgdBuryingPoint;
import cn.com.connext.scrm.service.DwaQuestionRecordService;
import cn.com.connext.scrm.service.DwaQuestionnaireService;
import cn.com.connext.scrm.service.SgdBuryingPointService;
import cn.com.connext.scrm.service.dto.JsonResult;
import cn.com.connext.scrm.web.rest.vm.DwaQuestionRecordVM;
import cn.com.connext.scrm.web.rest.vm.DwaQuestionnaireVM;
import cn.com.connext.scrm.web.rest.vm.SgdBuryingPointVM;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

;

/**
 * 苏格登活动
 */
@RestController
@RequestMapping("/api/shopping/sgdburyingpoint")
public class SgdBuryingPointResource {

    private final Logger log = LoggerFactory.getLogger(SgdBuryingPointResource.class);

    @Autowired
    private SgdBuryingPointService sgdBuryingPointService;


    /**
     * 新增点击按钮次数
     */
    @PostMapping("/save")
    public JsonResult saveDwaQuestionRecord(@RequestBody SgdBuryingPoint entity) {
        JsonResult result =new JsonResult();
        try{
            result = sgdBuryingPointService.save(entity);
        }catch (Exception e){
            log.error("e:{}",e.getMessage());
        }
        result.setState(0);
        result.setMessage("添加成功");
        return result;
    }


}
